{php $CSS = array('extend');}
{template 'header_gift'}


			{if $action == 'my'}
				<div class="b15">&nbsp;</div>
				<table class="gift_table" cellpadding="6" cellspacing="1" width="96%" align="center" bgcolor="#E3EEF5">
				<tr bgcolor="#F1F7FC">
				<th>订单编号</th>
				<th>礼品</th>
				<th>{$DT[credit_name]}</th>
				<th>下单时间</th>
				<th>状态</th>
				</tr>
				{loop $lists $k $v}
				<tr align="center" bgcolor="#FFFFFF">
				<td>{$v[oid]}</td>
				<td><a href="{$v[linkurl]}" target="_blank">{$v[title]}</a></td>
				<td>{$v[credit]}</td>
				<td>{$v[adddate]}</td>
				<td>{$v[status]}</td>
				</tr>
				{/loop}
				</table>
				<div class="pages">{$pages}</div>
				<div class="b10">&nbsp;</div>
				<script type="text/javascript">try{Dd('type_my').className='left_menu_on';}catch(e){}</script>
			{else}
				{if $itemid}
				{if isset($success)}
				
				<div class="submit_success">
					<div class="wrap ">
					恭喜您，礼品兑换成功！请检查您的联系方式是否正确，以便工作人员与您取得联系&nbsp;&nbsp;
					<a href="{$MODULE[2][linkurl]}edit.php" target="_blank">[更新联系方式]</a>
					<a href="{$url}index.php?action=my">[查看订单]</a>
					</div>
				</div>
				{/if}

			<div class="supply-wrap">
	        	<div class="supply-main" style="padding-top: 0px;">
	                <!-- path -->
			        <div class="path">
				        <a href="{$MODULE[1][linkurl]}">首页</a> <span>&gt;</span> <a href="{$url}">积分商城</a> <span>&gt;</span> {if $typeid} <a href="{$url}{list_url($typeid)}">{$TYPE[$typeid][typename]}</a>
				        {/if}       
			        </div>
		            <div class="unit clearfix">
		                <div class="app-it-l">

		                    <a href="{$url}{show_url($typeid)}" class="app-it-pic">
		                       <img src="{$thumb}" width="80" alt="{$title}"/>
		                        <p>{$title}</p>
		                    </a>
		                </div>
		                <div class="app-it-r">
		                    <div class="app-table">
		                        <ul>
		                            <li>
		                                <label>浏览次数：</label>{$hits}次
		                            </li>
		                            <li>
		                                <label>发布时间：</label>{$adddate}</li>
		                            <li>
		                                <label>会员权限：</label>{if $gname}{$gname}{else}全部{/if}</li>
		                            <li>
		                                <label>当前状态：</label>
		                                {if $left}<img src="{DT_STATIC}file/image/process_{get_process($fromtime, $totime)}.gif" align="absmiddle" alt="有效期：{$fromdate} 至 {$todate}"/>{else}<span class="f_red">已结束</span>{/if}</li>
		                             <li>
		                                <label>剩余名额：</label>{$left}</li>
		                            <li>
		                                <label>所需积分：</label>：
		                            <span class="app-price"><em>{$credit}</em></span>/{$DT[credit_name]}</li>
		                        </ul>
		                    </div>
		                    <p class="mt-20"><a href="javascript:;" class="ui-app-button " onclick="Order();"/>我要兑换</a> </p>
		                    <div class="app-tip">加入诚商通会员，获得全面的网络推广方案！<a href="#"> 去看看></a> 
		                    </div>
		                </div>
					 
		            </div>
	            
		            {if $content} 
		            <div class=" mt-20 unit app-r-box">
		                <h2 class="unit-tit">服务详情</h2>
		                <div class="app-unlimit-p">{$content}</div>
		            </div>{else}&nbsp;{/if}
	            </div>
	    	</div>
				<script type="text/javascript">
				function Order() {
					{if $process == 1}return confirm('抱歉，此兑换还没有开始');{/if}
					{if $process == 2}if(confirm('确定要兑换吗？系统将扣除您{$credit}{$DT[credit_name]}')) Go('{$url}index.php?action=order&itemid={$itemid}'){/if}
					{if $process == 3}return confirm('抱歉，此兑换已经过期');{/if}
					{if $process == 4}return confirm('抱歉，此兑换名额用尽，已经结束');{/if}
				}
				</script>
				{else}



			<div class="supply-wrap">
		        <div class="supply-main">
		            <div class="supply-tbanner clearfix" style="height: auto;">
		                <div class="unit market-new">
		                    <h3 class="unit-tit">新品推荐</h3>
		    
					 
						
						{loop $lists $k $v}
							{if $k==0}
		    				<div class="market-first">

		                        <div class="market-pic">
		                            <a href="{$v[linkurl]}"><img src="{$v[thumb]}" width="100" alt="{$v[alt]}"/></a>
		                        </div>
		                        <dl>
		                            <dt>{$v[title]}</dt>
		                            <dd><span class="app-price"><em>{$v[credit]}</em></span></em>{$DT[credit_name]}</dd>
		                        </dl>
		                    </div>

		                    <p class="markt-fir-tip">剩余{$v[left]}个名额</p>
		                    <div class="apply-buy">
		                        <a href="{$v[linkurl]}" target="_blank">立即兑换</a>
		                    </div>
		                    {/if}
		                {/loop}

		                </div>
		                <div class="sup-banner-box ">
		                    <div class="banner-mode market-banner fl">
		                        {ad(29)}
		                    </div>
		                </div>
		                <div class="sup-rl market-rl">
		                    <h3 class="unit-tit">兑换排行</h3>
		                    <div class="buy-top show-control">
		                       <ul>
		                            {loop $lists $k $v}
		                            <li class="select" >
		                               <p class="market-item-tit"><a href="{$v[linkurl]}">{$v[title]}</a></p>
		                               <div class="buy-top-item clearfix" >
		                                   <div class="market-first">
		                                       <div class="market-pic">
		                                           <a href="{$v[linkurl]}"><img src="{$v[thumb]}" width="100" alt="{$v[alt]}"/></a>
		                                       </div>
		                                       <dl>
		                                           <dt>{$v[title]}</dt>
		                                           <dd><span>{$v[amount]}次</span></dd>
		                                       </dl>
		                                   </div>
		                                   <a href="{$v[linkurl]}" class="buy-now-btn" target="_blank">立即兑换</a>
		                               </div>
		                           </li>
		                           {/loop}
		                              
		                       </ul>
		                    </div>
		                </div>
		            </div>
		            <div class="unit apply-box">
		                <h3 class="unit-tit">增值服务</h3>
		                <div class="apply-list">
		                    <ul class="clearfix">
		                        {loop $lists $k $v}
		                        <li class="li-hover">
		                            <a href="http://www.rdgou.com/gift/show-2.html">
		                                <div class="market-pic">
		                                    <img src="{$v[thumb]}" width="100" alt="{$v[alt]}"/>
		                                </div>
		                                <p class="apply-name">{$v[title]}</p>
		                            </a>
		                            <p class="apply-tip">剩余{$v[left]}个名额</p>
		                            <p class="apply-price"><span class="app-price"><em>{$v[credit]}</em></span>
		                            {$DT[credit_name]}</p>
		                            <a href="{$v[linkurl]}" class="apply-btn" target="_blank">立即兑换</a> 
		                        </li>
		                        {/loop}
		                    </ul>
		                </div>
		            </div>
		        </div>
		    </div>



				{/if}
				 
			{/if}
 
{template 'footer-mini'}